package lfr.ustc.ftp;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class DialogActivity extends Activity {
	
	String erroerType =null;
	boolean flag = false;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		erroerType = this.getIntent().getStringExtra("erroerType");
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dialog);
		TextView erroerInfo = (TextView)findViewById(R.id.erorrText);

		/* ��ݳ����������öԻ������ʵ��Ϣ��Ĭ��Ϊ���û�����������  */
		if(erroerType.equals("null")){ 
		
			erroerInfo.setText("�û�������벻��Ϊ��");

		}else if(erroerType.equals("save")){
			erroerInfo.setText("����Ĭ�϶˿ں�IP�ɹ�");
		}else if(erroerType.equals("timeOut")){ 
			 erroerInfo = (TextView)findViewById(R.id.erorrText);
			erroerInfo.setText("���糬ʱ");
		}

		Button back = (Button) findViewById(R.id.returnButton);
		back.setOnClickListener(new Button.OnClickListener() {
			public void onClick(View v) {
				back();
			}

		});
	}

	private void back() {
		this.finish();

	}
}